import request from '../utils/request'

export interface loginresponse{
    code?: string|number
    data?: any,
    message?: string
}
export interface LoginData{
    usernam:string
    password:string
}
/**
 * 登录请求
 * @returns 
 */
export const login = (user:LoginData)=>{
  return  request<any,loginresponse>({
        url:'/sessions',
        data:user,
        method:'POST'
    })
}